<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.14"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>libslic3r: src/libslic3r/LayerHeightSpline.hpp Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="Slic3r_192px_transparent.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">libslic3r
   </div>
   <div id="projectbrief">Library for generating gcode from 3d models</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.14 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_f69e6fbaea45487e96bc9ed8ccf9ff8f.html">libslic3r</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">LayerHeightSpline.hpp</div>  </div>
</div><!--header-->
<div class="contents">
<a href="_layer_height_spline_8hpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="preprocessor">#ifndef slic3r_LayerHeightSpline_hpp_</span></div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="preprocessor">#define slic3r_LayerHeightSpline_hpp_</span></div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;</div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="libslic3r_8h.html">libslic3r.h</a>&quot;</span></div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="preprocessor">#include &quot;BSpline/BSpline.h&quot;</span> <span class="comment">// Warning: original BSplineBase.h/cpp merged into BSpline.h/cpp to avoid dependency issues caused by Build::WithXSpp which tries to compile all .cpp files in /src</span></div><div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;</div><div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespace_slic3r.html">Slic3r</a> {</div><div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;</div><div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;</div><div class="line"><a name="l00010"></a><span class="lineno"><a class="line" href="class_slic3r_1_1_layer_height_spline.html">   10</a></span>&#160;<span class="keyword">class </span><a class="code" href="class_slic3r_1_1_layer_height_spline.html">LayerHeightSpline</a></div><div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;{</div><div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;    <span class="keyword">public</span>:</div><div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;    <a class="code" href="class_slic3r_1_1_layer_height_spline.html#a1671145871e33fc548c00bb0aff47f5b">LayerHeightSpline</a>();</div><div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;    <a class="code" href="class_slic3r_1_1_layer_height_spline.html#a1671145871e33fc548c00bb0aff47f5b">LayerHeightSpline</a>(<span class="keyword">const</span> <a class="code" href="class_slic3r_1_1_layer_height_spline.html">LayerHeightSpline</a> &amp;other);</div><div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;    <a class="code" href="class_slic3r_1_1_layer_height_spline.html">LayerHeightSpline</a>&amp; <a class="code" href="class_slic3r_1_1_layer_height_spline.html#a8e7d5e1c533e6be14d076495c6708607">operator=</a>(<span class="keyword">const</span> <a class="code" href="class_slic3r_1_1_layer_height_spline.html">LayerHeightSpline</a> &amp;other);</div><div class="line"><a name="l00016"></a><span class="lineno"><a class="line" href="class_slic3r_1_1_layer_height_spline.html#a4b80460930d53d21851b332b2e4ea34d">   16</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="class_slic3r_1_1_layer_height_spline.html#a4b80460930d53d21851b332b2e4ea34d">setObjectHeight</a>(<a class="code" href="namespace_slic3r.html#a2ac5c755948c74f5f5f975acd5057fe9">coordf_t</a> object_height) { this-&gt;_object_height = object_height; };</div><div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;    <span class="keywordtype">bool</span> <a class="code" href="class_slic3r_1_1_layer_height_spline.html#a10e795daea8d329b207492a333161f3a">hasData</a>(); <span class="comment">// indicate that we have valid data;</span></div><div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;    <span class="keywordtype">bool</span> <a class="code" href="class_slic3r_1_1_layer_height_spline.html#a27c1a69278a52e2df4569f41d1e258fc">setLayers</a>(std::vector&lt;coordf_t&gt; layers);</div><div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;    <span class="keywordtype">bool</span> <a class="code" href="class_slic3r_1_1_layer_height_spline.html#a6b459405784b191fe0421af3ecca8cf2">updateLayerHeights</a>(std::vector&lt;coordf_t&gt; heights);</div><div class="line"><a name="l00020"></a><span class="lineno"><a class="line" href="class_slic3r_1_1_layer_height_spline.html#a642fdc0d96d4687651c59a310d5bf6d2">   20</a></span>&#160;    <span class="keywordtype">bool</span> <a class="code" href="class_slic3r_1_1_layer_height_spline.html#a642fdc0d96d4687651c59a310d5bf6d2">layersUpdated</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> this-&gt;_layers_updated; }; <span class="comment">// true if the basis set of layers was updated (by the slicing algorithm)</span></div><div class="line"><a name="l00021"></a><span class="lineno"><a class="line" href="class_slic3r_1_1_layer_height_spline.html#a7a09b607aa8a564c3771dbdf747356be">   21</a></span>&#160;    <span class="keywordtype">bool</span> <a class="code" href="class_slic3r_1_1_layer_height_spline.html#a7a09b607aa8a564c3771dbdf747356be">layerHeightsUpdated</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> this-&gt;_layer_heights_updated; }; <span class="comment">// true if the heights where updated (by the spline control user interface)</span></div><div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;    <span class="keywordtype">void</span> <a class="code" href="class_slic3r_1_1_layer_height_spline.html#a32c8d47d3d85b26c0e12dce9573659ec">clear</a>();</div><div class="line"><a name="l00023"></a><span class="lineno"><a class="line" href="class_slic3r_1_1_layer_height_spline.html#a7fc59f1462afc922d42685b048a8509d">   23</a></span>&#160;    std::vector&lt;coordf_t&gt; <a class="code" href="class_slic3r_1_1_layer_height_spline.html#a7fc59f1462afc922d42685b048a8509d">getOriginalLayers</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> this-&gt;_layers; };</div><div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;    std::vector&lt;coordf_t&gt; <a class="code" href="class_slic3r_1_1_layer_height_spline.html#ab1a2eec6c18d1850c2d72bace14257d4">getInterpolatedLayers</a>() <span class="keyword">const</span>;</div><div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;    <span class="keyword">const</span> <a class="code" href="namespace_slic3r.html#a2ac5c755948c74f5f5f975acd5057fe9">coordf_t</a> <a class="code" href="class_slic3r_1_1_layer_height_spline.html#aa301b73f64d1fbaebe446f1f15018dfe">getLayerHeightAt</a>(<a class="code" href="namespace_slic3r.html#a2ac5c755948c74f5f5f975acd5057fe9">coordf_t</a> height);</div><div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;</div><div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;    <span class="keyword">private</span>:</div><div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;    <span class="keywordtype">bool</span> _updateBSpline();</div><div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;</div><div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;    <a class="code" href="namespace_slic3r.html#a2ac5c755948c74f5f5f975acd5057fe9">coordf_t</a> _object_height;</div><div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;    <span class="keywordtype">bool</span> _is_valid;</div><div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;    <span class="keywordtype">bool</span> _layers_updated;</div><div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;    <span class="keywordtype">bool</span> _layer_heights_updated;</div><div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;    std::vector&lt;coordf_t&gt; _layers;</div><div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;    std::vector&lt;coordf_t&gt; _layer_heights;</div><div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;    std::vector&lt;coordf_t&gt; _spline_layers;</div><div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;    std::vector&lt;coordf_t&gt; _spline_layer_heights;</div><div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;    std::unique_ptr&lt;BSpline&lt;double&gt;&gt; _layer_height_spline;</div><div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;};</div><div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;</div><div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;}</div><div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;</div><div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;<span class="preprocessor">#endif</span></div><div class="ttc" id="libslic3r_8h_html"><div class="ttname"><a href="libslic3r_8h.html">libslic3r.h</a></div></div>
<div class="ttc" id="class_slic3r_1_1_layer_height_spline_html_aa301b73f64d1fbaebe446f1f15018dfe"><div class="ttname"><a href="class_slic3r_1_1_layer_height_spline.html#aa301b73f64d1fbaebe446f1f15018dfe">Slic3r::LayerHeightSpline::getLayerHeightAt</a></div><div class="ttdeci">const coordf_t getLayerHeightAt(coordf_t height)</div><div class="ttdef"><b>Definition:</b> LayerHeightSpline.cpp:150</div></div>
<div class="ttc" id="class_slic3r_1_1_layer_height_spline_html_a1671145871e33fc548c00bb0aff47f5b"><div class="ttname"><a href="class_slic3r_1_1_layer_height_spline.html#a1671145871e33fc548c00bb0aff47f5b">Slic3r::LayerHeightSpline::LayerHeightSpline</a></div><div class="ttdeci">LayerHeightSpline()</div><div class="ttdef"><b>Definition:</b> LayerHeightSpline.cpp:14</div></div>
<div class="ttc" id="class_slic3r_1_1_layer_height_spline_html_a4b80460930d53d21851b332b2e4ea34d"><div class="ttname"><a href="class_slic3r_1_1_layer_height_spline.html#a4b80460930d53d21851b332b2e4ea34d">Slic3r::LayerHeightSpline::setObjectHeight</a></div><div class="ttdeci">void setObjectHeight(coordf_t object_height)</div><div class="ttdef"><b>Definition:</b> LayerHeightSpline.hpp:16</div></div>
<div class="ttc" id="namespace_slic3r_html_a2ac5c755948c74f5f5f975acd5057fe9"><div class="ttname"><a href="namespace_slic3r.html#a2ac5c755948c74f5f5f975acd5057fe9">Slic3r::coordf_t</a></div><div class="ttdeci">double coordf_t</div><div class="ttdef"><b>Definition:</b> libslic3r.h:42</div></div>
<div class="ttc" id="class_slic3r_1_1_layer_height_spline_html_a6b459405784b191fe0421af3ecca8cf2"><div class="ttname"><a href="class_slic3r_1_1_layer_height_spline.html#a6b459405784b191fe0421af3ecca8cf2">Slic3r::LayerHeightSpline::updateLayerHeights</a></div><div class="ttdeci">bool updateLayerHeights(std::vector&lt; coordf_t &gt; heights)</div><div class="ttdef"><b>Definition:</b> LayerHeightSpline.cpp:78</div></div>
<div class="ttc" id="class_slic3r_1_1_layer_height_spline_html_a7a09b607aa8a564c3771dbdf747356be"><div class="ttname"><a href="class_slic3r_1_1_layer_height_spline.html#a7a09b607aa8a564c3771dbdf747356be">Slic3r::LayerHeightSpline::layerHeightsUpdated</a></div><div class="ttdeci">bool layerHeightsUpdated() const</div><div class="ttdef"><b>Definition:</b> LayerHeightSpline.hpp:21</div></div>
<div class="ttc" id="class_slic3r_1_1_layer_height_spline_html"><div class="ttname"><a href="class_slic3r_1_1_layer_height_spline.html">Slic3r::LayerHeightSpline</a></div><div class="ttdef"><b>Definition:</b> LayerHeightSpline.hpp:10</div></div>
<div class="ttc" id="namespace_slic3r_html"><div class="ttname"><a href="namespace_slic3r.html">Slic3r</a></div><div class="ttdef"><b>Definition:</b> BoundingBox.cpp:4</div></div>
<div class="ttc" id="class_slic3r_1_1_layer_height_spline_html_a27c1a69278a52e2df4569f41d1e258fc"><div class="ttname"><a href="class_slic3r_1_1_layer_height_spline.html#a27c1a69278a52e2df4569f41d1e258fc">Slic3r::LayerHeightSpline::setLayers</a></div><div class="ttdeci">bool setLayers(std::vector&lt; coordf_t &gt; layers)</div><div class="ttdef"><b>Definition:</b> LayerHeightSpline.cpp:53</div></div>
<div class="ttc" id="class_slic3r_1_1_layer_height_spline_html_ab1a2eec6c18d1850c2d72bace14257d4"><div class="ttname"><a href="class_slic3r_1_1_layer_height_spline.html#ab1a2eec6c18d1850c2d72bace14257d4">Slic3r::LayerHeightSpline::getInterpolatedLayers</a></div><div class="ttdeci">std::vector&lt; coordf_t &gt; getInterpolatedLayers() const</div><div class="ttdef"><b>Definition:</b> LayerHeightSpline.cpp:113</div></div>
<div class="ttc" id="class_slic3r_1_1_layer_height_spline_html_a642fdc0d96d4687651c59a310d5bf6d2"><div class="ttname"><a href="class_slic3r_1_1_layer_height_spline.html#a642fdc0d96d4687651c59a310d5bf6d2">Slic3r::LayerHeightSpline::layersUpdated</a></div><div class="ttdeci">bool layersUpdated() const</div><div class="ttdef"><b>Definition:</b> LayerHeightSpline.hpp:20</div></div>
<div class="ttc" id="class_slic3r_1_1_layer_height_spline_html_a10e795daea8d329b207492a333161f3a"><div class="ttname"><a href="class_slic3r_1_1_layer_height_spline.html#a10e795daea8d329b207492a333161f3a">Slic3r::LayerHeightSpline::hasData</a></div><div class="ttdeci">bool hasData()</div><div class="ttdef"><b>Definition:</b> LayerHeightSpline.cpp:44</div></div>
<div class="ttc" id="class_slic3r_1_1_layer_height_spline_html_a7fc59f1462afc922d42685b048a8509d"><div class="ttname"><a href="class_slic3r_1_1_layer_height_spline.html#a7fc59f1462afc922d42685b048a8509d">Slic3r::LayerHeightSpline::getOriginalLayers</a></div><div class="ttdeci">std::vector&lt; coordf_t &gt; getOriginalLayers() const</div><div class="ttdef"><b>Definition:</b> LayerHeightSpline.hpp:23</div></div>
<div class="ttc" id="class_slic3r_1_1_layer_height_spline_html_a8e7d5e1c533e6be14d076495c6708607"><div class="ttname"><a href="class_slic3r_1_1_layer_height_spline.html#a8e7d5e1c533e6be14d076495c6708607">Slic3r::LayerHeightSpline::operator=</a></div><div class="ttdeci">LayerHeightSpline &amp; operator=(const LayerHeightSpline &amp;other)</div><div class="ttdef"><b>Definition:</b> LayerHeightSpline.cpp:27</div></div>
<div class="ttc" id="class_slic3r_1_1_layer_height_spline_html_a32c8d47d3d85b26c0e12dce9573659ec"><div class="ttname"><a href="class_slic3r_1_1_layer_height_spline.html#a32c8d47d3d85b26c0e12dce9573659ec">Slic3r::LayerHeightSpline::clear</a></div><div class="ttdeci">void clear()</div><div class="ttdef"><b>Definition:</b> LayerHeightSpline.cpp:99</div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.14
</small></address>
</body>
</html>
